<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/home', 'HomeController@index')->name('home');
    $router->get('/', 'HomeController@index')->name('home');

    $router->get('objs/api/cities', 'ObjController@cities');
    $router->get('objs/{id}/api/cities', 'ObjController@cities');

    $router->resource('auth/users', 'UserController')->names('admin.auth.users');
//    $router->get('setting', Setting::class);
    $router->resources([

        'orgs'              => OrgController::class,
        'members'              => MemberController::class,
        'objs'              => ObjController::class,
        'asss'              => AssController::class,
        'works'              => WorkController::class,
        'configs'              => ConfigController::class,
    ]);

});
